package com.example.book_test.model;

import lombok.Data;

import java.util.List;

@Data
public class PageResult<T> {
    /**
     * 当前页的记录
     */
    private List<BookInfo> records;

    /**
     * 总记录数
     */
    private Integer total;

    //此处设置0表示成功，-1为失败
    private Integer code;
    //错误信息
    private String errMsg;
    private PageRequest request;

    public PageResult(List<BookInfo> records, Integer total, PageRequest request) {
        this.records = records;
        this.total = total;
        this.request = request;
    }
}
